﻿/*
 * KLF Headless Browser
 * Written by Kris Oye <kristianoye@gmail.com>
 * Copyright (C) 2011-2012.  All rights reserved.
 */
namespace KLF.Lib.Browser.DOM.CSS
{
    /// <summary>
    /// The CSSPageRule interface represents a @page rule within a CSS style 
    /// sheet. The @page rule is used to specify the dimensions, orientation,
    /// margins, etc. of a page box for paged media.
    /// </summary>
    public class CSSPageRule : CSSRule
    {
        #region Constructors

        public CSSPageRule()
            : base()
        {
            style = new CSSStyleDeclaration();
        }

        #endregion

        #region DOM Level 2 CSS Compliance

        /// <summary>
        /// The parsable textual representation of the page selector 
        /// for the rule.
        /// </summary>
        public string selectorText
        {
            get
            {
                return _selectorText != null ? _selectorText.Value : "";
            }
            set
            {
                _selectorText = new StringLookup(value);
            }
        }
        internal StringLookup _selectorText;

        /// <summary>
        /// The declaration-block of this rule.
        /// </summary>
        public CSSStyleDeclaration style
        {
            get;
            internal set;
        }

        #endregion
    }
}
